package com.test;

import java.math.BigInteger;
import java.util.*;

public class Main03
{
    public static void main(String[] args)
    {
        System.out.println(FirstNotRepeatingChar("google"));
    }
    public static int FirstNotRepeatingChar(String str) {
        int count = 0;
        for(int i = 0; i < str.length(); i++){
            for(int j = 0; j < str.length(); j++){
                System.out.println("test");

                if(str.substring(j,j+1).equals(str.substring(i,i+1))){
                    count++;
                }
            }
            if(count == 1){
                return i;
            }else{
                count = 0;
            }
        }
        return 0;
    }

    public static int NumberOf1Between1AndN_Solution(int n) {
        int count = 0;
        for(int i = 1; i <= n; i++){
            int j = i;
            while(j > 0){
                int temp = j % 10;
                j = j / 10;
                if(j == 10){
                    count++;
                    break;
                }
                if(j < 10 && j == 1){
                    count++;
                    break;
                }
                if(temp == 1)count++;

            }
        }
        return ++count;
    }
}